<template>
  <div class="login">
    <div class="login-body">
      <div class="content-top">
        <span class="content-top-font">鸿后台管理</span>
      </div>
      <div class="content-body">
        <div class="content-body-top">
          <div>
            <span class="login-info" style="  padding-left: 50px;">账号：</span>
            <el-input v-model="form.username" style="width: 400px;height: 50px"/>
          </div>
          <div>
            <span class="login-info" style="padding-left: 50px;">密码：</span>
            <el-input v-model="form.password" style="width: 400px;height: 50px;" show-password clearable/>
          </div>
          <div style="display: flex;align-items: center">
            <span class="login-info" style="padding-left: 32px;">验证码：</span>
            <el-input v-model="form.code" style="width: 100px;height: 50px"/>

            <el-image style="width:100px;height: 50px "
                      :src="'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'"
                      />
          </div>
        </div>
        <div class="content-body-button">
          <el-button @click="login" type="primary" class="loginInfo">登录</el-button>
<!--          <el-button @click="login" class="touristInfo">游客登录</el-button>-->
        </div>

      </div>
      <div class="content-button">下</div>
    </div>

  </div>
</template>

<script>
export default {
  name: "login",
  computed: {},
  props: [],
  components: {},
  data() {
    return {
      form: {
        username: null,
        password: null,
      },
    }
  },
  methods: {
    login() {
      //登录
      this.$store.dispatch('loginInfo',this.form).then(res=>{
        this.$router.push('/')
      }).catch(e=>{

      })
    },
  },
  watch: {},
  created() {
  },
  mounted() {
  },
}
</script>

<style scoped>
.login {
  width: 100%;
  height: 100%;
  background-image: url("../../assets/bjtp.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-body {
  width: 600px;
  height: 400px;
  background-color: rgba(0, 0, 0, 0.5);
  border: 2px solid #ccc;
  border-radius: 5px;
  box-shadow: 0px 0px 19px #b7b7a66b;
}

.content-top {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
}

.content-top-font {
  font-size: 22px;
  font-weight: 600;
  color: white;
}

.content-body {
  height: 300px;
}

.content-body-top {
  height: 200px;

  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.content-body-top /deep/ .el-input__wrapper {
  background-color: rgba(0, 0, 0, 0);
  color: white;
}

.content-body-top /deep/ .el-input__inner {
  color: white;
}

.login-info {
  font-weight: 600;
  font-size: 16px;
  color: white;
}

.content-body-button {
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loginInfo {
  /*margin-right: 20px;*/
  color: white;
  font-weight: 600;
  font-size: 20px;
  /*background-image: linear-gradient(rgba(32, 76, 250, 0.85), #85959d,rgba(32, 164, 250, 0.85));*/
  width: 400px;
  height: 50px;
  margin: 0 0 5px 0;
  border: 1px solid black;
}

.touristInfo {
  font-weight: 600;
  font-size: 16px;
  width: 400px;
  margin: 0px !important;

}

.registerInfo {
  /*margin-left: 20px;*/
  font-weight: 600;

}

.content-button {
  height: 50px;
}

</style>